open(BUFF,"ls /data1/bsi/BORA_processing/devel/data_HGUPLUS2/GSE2109_RAW |");
$name = 0;
while($line = <BUFF> )
{
	
	chomp($line);
	#print "nar $line\n";
	system("cp ./GSE2109_RAW/$line /data1/bsi/BORA_processing/devel/data_HGUPLUS2/temp/");
	#system("gunzip $line");
	#$name = $line;
	#$name =~ s/\.CEL\.gz//g;
	#print "naresh".$name."\n";
	for($i=1;$i<99;$i++)
	{
		$line = <BUFF>;
		chomp($line);
		system("cp ./GSE2109_RAW/$line /data1/bsi/BORA_processing/devel/data_HGUPLUS2/temp/");
	}
	$name ++;
	
	system("Rscript /data1/bsi/BORA_processing/devel/data_HGUPLUS2/rscript_barcode_presentabsent.R");
	$sys = "mv /data1/bsi/BORA_processing/devel/data_HGUPLUS2/temp/present_absent.txt /data1/bsi/BORA_processing/devel/data_HGUPLUS2/results/$name"."_present_absent.txt"; 
	$sys1  = "mv /data1/bsi/BORA_processing/devel/data_HGUPLUS2/temp/barcode.txt /data1/bsi/BORA_processing/devel/data_HGUPLUS2/results/$name"."_barcode.txt";
	$sys2  = "mv /data1/bsi/BORA_processing/devel/data_HGUPLUS2/temp/frma.txt /data1/bsi/BORA_processing/devel/data_HGUPLUS2/results/$name"."_frma.txt";
	system($sys);
	system($sys1);
	system($sys2);
	system("rm /data1/bsi/BORA_processing/devel/data_HGUPLUS2/temp/*");
}
